<?php
// Copyright 2019 Hackware SpA <human@hackware.cl>
// "Hackware Web Services Core" is released under the MIT License terms.

namespace Hawese\Core\Exceptions;

use Exception;

class UnknownForeignObjectException extends Exception
{
    private $detail = [];
    public $status;

    public function __construct($model, $attribute)
    {
        parent::__construct(
            'Unknown foreign object', // message
            2 // code
        );

        $this->detail = [
            'model' => $model,
            'attribute' => $attribute
        ];

        $this->status = 400;
    }

    public function getDetail()
    {
        return $this->detail;
    }
}
